package com.automannn.seataSamples.business.service;

import com.automannn.seataSamples.api.dto.BusinessDTO;
import com.automannn.seataSamples.api.response.ObjectResponse;

/**
 * @author automannn
 * @Date 2022/3/24
 */
public interface BusinessService {

    /**
     * 业务正常执行，全局事务提交
     * @param businessDTO 业务信息
     * @return 执行状态
     */
    ObjectResponse handleBusinessSuccess(BusinessDTO businessDTO);


    /**
     * 业务执行异常，事务回滚
     * @param businessDTO 业务信息
     * @return 执行状态
     */
    ObjectResponse handleBusinessFailWithRollback(BusinessDTO businessDTO);
}
